package org.ehe.erp.domain.product.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.ehe.erp.domain.product.CodingRule;
/**
 * @author :zhangnn
 * @className :CodingRuleBo
 * @description: TODO
 * @date 2025-09-06 14:55:05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CodingRule.class, reverseConvertGenerate = false)
public class CodingRuleBo extends BaseEntity {

    private Long id;

    private Long categoryId;

    @NotNull(message = "层级不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer level;

    private String prefix;

    @NotNull(message = "数字位数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer digitLength;

    private String separatorCode;

    @NotNull(message = "起始数字不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer startNumber;

    private Integer incrementStep;

    @NotBlank(message = "规则名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String ruleName;

    private String ruleDesc;

    @NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;
}
